/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) [2021] [Fudan Microelectronics]
  * THIS SOFTWARE is licensed under Mulan PSL v2.
  * can use this software according to the terms and conditions of the Mulan PSL v2.
  * You may obtain a copy of Mulan PSL v2 at:
  *          http://license.coscl.org.cn/MulanPSL2
  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  * See the Mulan PSL v2 for more details.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _MAIN_H_
#define _MAIN_H_

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>


#ifdef _MAIN_C_
#include "lptim.h"
#include "dataflash.h"
#include "usart.h"
#include "relay.h"
#endif

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
#define BIT0                                                         (0x0001UL)
#define BIT1                                                         (0x0002UL)
#define BIT2                                                         (0x0004UL)
#define BIT3                                                         (0x0008UL)
#define BIT4                                                         (0x0010UL)
#define BIT5                                                         (0x0020UL)
#define BIT6                                                         (0x0040UL)
#define BIT7                                                         (0x0080UL)
#define BIT8                                                         (0x0100UL)
#define BIT9                                                         (0x0200UL)
#define BIT10                                                        (0x0400UL)
#define BIT11                                                        (0x0800UL)
#define BIT12                                                        (0x1000UL)
#define BIT13                                                        (0x2000UL)
#define BIT14                                                        (0x4000UL)
#define BIT15                                                        (0x8000UL)

#define _ON                                                          (0x01)
#define _OFF                                                         (0x00)

// system flags

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

extern uint16_t guiSysFlag;

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* _MAIN_H_ */

/************************ (C) COPYRIGHT FMSH *****END OF FILE****/
